package com.yhb.myshop.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

public class TbUser extends BaseEntity implements Serializable {

    @NotEmpty(message = "用户名不能为空")
    @Length(min = 6,max = 10,message = "用户名长度为 6 - 10 位")
    private String username;

    private String password;
    @NotEmpty(message = "手机号码不能为空")
    private String phone;

    @NotEmpty(message = "邮箱不能为空")
    private String email;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }


    public String getPassword() {
        return password;
    }

    @JsonIgnore
    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

}
